<div class="page-header" id="Message">
    <h2>{{i18n "Add Application"}}</h2>
</div>

<div class="white-wrapper add-padding-5x">
    <form class="form-horizontal" id="appAddForm">

        <div class="form-group">
            <label class="control-label col-md-3 col-lg-3" for="application-name">{{i18n "Name"}}<span
                    class="requiredAstrix">*</span></label>

            <div class="col-md-9 col-lg-9">
                <input type="text" class="form-control required validateSpecialChars validName"
                       title="Application Name" id="application-name" autofocus="autofocus"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-md-3 col-lg-3 control-label" for="appTier">Per Token Quota</label>

            <div class="col-md-9 col-lg-9">
                <select id="appTier" name="appTier" onChange="tierChanged(this)">
                    {{#each @params.list}}
                        <option title={{ this.name }} value="{{this.name }}"> {{ this.name }} {{ this.description }}</option>
                    {{/each}}
                </select>
                <div class="help-block">{{i18n "This feature allows you to assign an API request quota per access token.Allocated quota will be shared among all the subscribed APIs of the application."}}
                </div>
                <input type="hidden" id="tierDescriptions" name="tierDescriptions" value=""/>
            </div>
        </div>
        <div class="form-group">
            <label for="description" class="col-md-3 col-lg-3 control-label">{{i18n "Description"}}</label>

            <div class="col-md-9 col-lg-9">
                <textarea id="description" class="form-control" type="text" rows="3"></textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-3 col-sm-9">
                <input type="submit" id="application-add-button" class="btn btn-primary"  value="{{i18n "Add"}}"/>
                <a title=Cancel" href="{{@contextPath}}/applications" class="btn btn-default">{{i18n "Cancel"}}</a>
            </div>
        </div>
    </form>
</div>
